#ifndef PIT_H
#define PIT_H

#include <QGraphicsItem>
#include <QPainter>
#include <QRectF>
#include <QBrush>
#include "ball.h"

class Ball;

class Pit : public QGraphicsItem
{
public:
    Pit(int x, int y, int row, int col, int d);

    void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget);
    QRectF boundingRect() const;

    int row() { return m_row; }
    int col() { return m_col; }
    Ball* getBall();

    enum { Type = UserType + 1 };

    int type() const
    {
        // Enable the use of qgraphicsitem_cast with this item.
        return Type;
    }
private:
    int d;
    int m_row, m_col;
};

#endif // PIT_H
